package com.xx.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@TableName("dish")
@Schema(name = "Dish", description = "")
public class Dish {

    @Schema(description = "菜品ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "菜品名称")
    @TableField("name")
    private String name;

    @Schema(description = "分类ID")
    @TableField("category_id")
    private Integer categoryId;

    @Schema(description = "价格")
    @TableField("price")
    private BigDecimal price;

    @Schema(description = "菜品描述")
    @TableField("description")
    private String description;

    @Schema(description = "图片URL")
    @TableField("image_url")
    private String imageUrl;

    @Schema(description = "上架状态（0：下架，1：上架）")
    @TableField("status")
    private Integer status;

    @Schema(description = "创建时间")
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private Date createdAt;

    @Schema(description = "更新时间")
    @TableField("updated_at")
    private Date updatedAt;
}
